Call `Dotenv.overload` after `Dotenv::Railtie.load` is called

`dotenv-rails` calls `Dotenv::Railtie.load` when `Huginn::Application`
is defined, so the `Dotenv.overload` call should be moved here.

Akinori MUSHA 9 years ago
parent
commit
cf5f96cb59
1 changed files with 2 additions and 2 deletions
  1. 2 2
      config/application.rb

+ 2 - 2
config/application.rb

@@ -4,10 +4,10 @@ require 'rails/all'
4 4
 
5 5
 Bundler.require(:default, Rails.env)
6 6
 
7
-Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test?
8
-
9 7
 module Huginn
10 8
   class Application < Rails::Application
9
+    Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test?
10
+
11 11
     # Settings in config/environments/* take precedence over those specified here.
12 12
     # Application configuration should go into files in config/initializers
13 13
     # -- all .rb files in that directory are automatically loaded.